﻿namespace RndMaterialDisposalService.Models.RequestModel
{
    public class CapitalRepairElectronFlowReq
    {
        //1.维修申请
        public RepairRequestModel repairRequest { get; set; } = new RepairRequestModel();
        //2.部门审核
        public DepartmentReviewModel departmentReview { get; set; } = new DepartmentReviewModel();
        //3.维修接口人（维修安排）
        public MaintenanceContactPersonModel maintenanceContactPerson { get; set; } = new MaintenanceContactPersonModel();
        //4.维修（维修工程师）
        public RepairModel repair { get; set; } = new RepairModel();
        //5.验证(采购部门人员)
        public VerificationModel verification { get; set; } = new VerificationModel();
        //6.批准（部门权签人）
        public ApprovalModel approval { get; set; } = new ApprovalModel();
        //7.维修工程师执行
        public MaintenanceEngineerModel maintenanceEngineer { get; set; } = new MaintenanceEngineerModel();
        //8.回执（送修人）
        public ReceiptModel receipt { get; set; } = new ReceiptModel();
        //资产明细
        public List<CapitalDetailModel> AssetDetail { get; set; } = new List<CapitalDetailModel>();
        //附件
        public List<Attachment> UploadFiles { get; set; } = new List<Attachment>();
    }

    /// <summary>
    /// 1.维修申请
    /// </summary>
    public class RepairRequestModel 
    {
        //送修人姓名
        public string SongCarRenName { get; set; }
        //送修人工号
        public string SongCarRenUserId { get; set; }
        //送修人详细信息
        public List<ChoiceUserInfoModel> SongCarRenInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //联系电话
        public string ContactNumber { get; set; }
        //公司段
        public string CompanySegment { get; set; }
        //公司段配置参数
        public string BookType { get; set; }
        //资产编号
        public string AssetNo { get; set; }
        //部门名称
        public string DepartmentName { get; set; }
        //资产名称
        public string AssetName { get; set; }
        //计量属性
        public string MeasurementAttribute { get; set; }
        //部门编码
        public string DepartmentNumber { get; set; }
        //出厂编号\机身序列号
        public string FactoryNo { get; set; }
        //供应商名称
        public string SupplierName { get; set; }
        //损害日期
        public DateTime? DamageTime { get; set; }
        //资产启用日期
        public DateTime? AssetActivationTime { get; set; }
        //自行询价情况
        public string SelfInquiry { get; set; }
        //故障现象描述
        public string FaultDescription { get; set; }
        //使用状况描述
        public string UsageDescription { get; set; }
        //故障原因
        public string CauseOfFailure { get; set; }
        //部门经理NotesID
        public string NotesID { get; set; }
        //部门经理工号
        public string NotesUserID { get; set; }
        //部门经理详细信息
        public List<ChoiceUserInfoModel> NotesInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //修接口人(维修安排）
        public string MaintenanceContactPerson { get; set; }
        //维修接口人(维修安排）工号
        public string MaintenanceContactPersonUserID { get; set; }
        //维修接口人(维修安排）详细信息
        public DropDownBoxPickModel MaintenanceContactPersonInfo { get; set; }
        //是否风险评估
        public string IsRiskAssessment { get; set; }
        //原值
        public string OriginalValue { get; set; }
        //净值
        public string NetWorth { get; set; }
        //使用年限
        public string ServiceLife { get; set; }
        //历史维修次数
        public string HistoricalMaintenanceCount { get; set; }

    }

    /// <summary>
    /// 2.部门审核
    /// </summary>
    public class DepartmentReviewModel 
    {
        //审核决定
        public string AuditDecision { get; set; }
        //意见
        public string opinion { get; set; }
    }

    /// <summary>
    /// 3.维修接口人（维修安排）
    /// </summary>
    public class MaintenanceContactPersonModel 
    {
        //审核决定
        public string AuditDecision { get; set; }
        //维修工程师
        public string MaintenanceEngineerName { get; set; }
        //维修工程师工号
        public string MaintenanceEngineerUserID { get; set; }
        //维修工程师详细信息
        public List<ChoiceUserInfoModel> MaintenanceEngineerInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //意见
        public string opinion { get; set; }
    }

    /// <summary>
    /// 4.维修（维修工程师）
    /// </summary>
    public class RepairModel 
    {
        //收到实物时间
        public DateTime? ReceivedInKindTime { get; set; }
        //开始维修时间
        public DateTime? MaintenanceStartTime { get; set; }
        //维修电子流与实物送修信息是否一致
        public string IsInformationConsistency { get; set; }
        //承诺周期
        public string CommitmentCycle { get; set; }
        //仪器品牌
        public string InstrumentBrand { get; set; }
        //仪器型号
        public string InstrumentModel { get; set; }
        //保修期内
        public string WithinTheWarrantyPeriod { get; set; }
        //委外维修
        public string SubcontractingRepair { get; set; }
        //维修商名称
        public string MaintainerName { get; set; }
        //联系电话
        public string ContactNumber { get; set; }
        //委外送走日期
        public DateTime? OutsourcingDeliveryDate { get; set; }
        //供应商邮箱
        public string SupplierEmail { get; set; }
        //委外完成日期
        public DateTime? SubcontractingCompletionDate { get; set; }
        //维修服务商反馈摘要
        public string FeedbackSummary { get; set; }
        //维修费用
        public string MaintenanceCosts { get; set; }
        //价格
        public string Price { get; set; }
        //故障现象确认
        public string FaultPhenomenonConfirmation { get; set; }
        //维修实施情况
        public string MaintenanceImplementation { get; set; }
        //操作注意事项
        public string OperationPrecautions { get; set; }
        //采购部门验证费用
        public string PurchaseDepartmentExpenses { get; set; }
        //采购部门验证费用人员工号
        public string PurchaseDepartmentExpensesUserID { get; set; }
        //采购部门验证费用人员信息
        public List<ChoiceUserInfoModel> PurchaseDepartmentExpensesInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //部门权签人审批费用
        public string DepartmentApprovalExpense { get; set; }
        //部门权签人审批费用人员工号
        public string DepartmentApprovalExpenseUserID { get; set; }
        //部门权签人审批费用人员信息
        public List<ChoiceUserInfoModel> DepartmentApprovalExpenseInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //回执人员
        public string ReceiptPersonnel { get; set; }
        //回执人员工号
        public string ReceiptPersonnelUserID { get; set; }
        //回执人员信息
        public List<ChoiceUserInfoModel> ReceiptPersonnelInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //审批
        public string Approval { get; set; }
    }

    /// <summary>
    /// 5.验证(采购部门人员)
    /// </summary>
    public class VerificationModel 
    {
        //审核决定
        public string AuditDecision { get; set; }
        //意见
        public string opinion { get; set; }
        //抄送人
        public string CcName { get; set; }
        //抄送人详细信息
        public List<ChoiceUserInfoModel> CcInfo { get; set; } = new List<ChoiceUserInfoModel>();
        //最终采购价格
        public string FinalPurchasePrice { get; set; }
        //供应商名称
        public string VerificationSupplierName { get; set; }
    }

    /// <summary>
    /// 6.批准（部门权签人）
    /// </summary>
    public class ApprovalModel 
    {
        //审核决定
        public string AuditDecision { get; set; }
        //意见
        public string opinion { get; set; }
        //抄送人
        public string CcName { get; set; }
        //抄送人详细信息
        public List<ChoiceUserInfoModel> CcInfo { get; set; } = new List<ChoiceUserInfoModel>();
        // 部门权签人审批日期
        public DateTime? DepartmentSignatureDate { get; set; }
    }

    /// <summary>
    /// 7.维修工程师执行
    /// </summary>
    public class MaintenanceEngineerModel 
    {
        //审核决定
        public string AuditDecision { get; set; }
        //意见
        public string opinion { get; set; }
        //抄送人
        public string CcName { get; set; }
        //抄送人详细信息
        public List<ChoiceUserInfoModel> CcInfo { get; set; } = new List<ChoiceUserInfoModel>();
    }

    /// <summary>
    /// 8.回执（送修人）
    /// </summary>
    public class ReceiptModel 
    {
        //维修是否合格
        public string IsQualifiedMaintenance { get; set; }
        //意见
        public string opinion { get; set; }
        //抄送人
        public string CcName { get; set; }
        //抄送人详细信息
        public List<ChoiceUserInfoModel> CcInfo { get; set; } = new List<ChoiceUserInfoModel>();
    }

    /// <summary>
    /// 选人控件实体模型
    /// </summary>
    public class ChoiceUserInfoModel 
    {
        public string Id { get; set; }
        public string Gender { get; set; }
        public LastNameAndFirstNameModel Name { get; set; }
        public string EmployeeNumber { get; set; }
        public string Email { get; set; }
        public string Cname { get; set; }
    }

    /// <summary>
    /// //姓、名
    /// </summary>
    public class LastNameAndFirstNameModel 
    {
        public string First { get; set; }
        public string Last { get; set; }
    }

    /// <summary>
    /// 下拉框控件选人实体模型
    /// </summary>
    public class DropDownBoxPickModel 
    {
        public string endTime { get; set; }
        public string itemCode { get; set; }
        public string itemName { get; set; }
        public string itemValue { get; set; }
        public string key { get; set; }
        public string parentId { get; set; }
        public string remark { get; set; }
        public string startTime { get; set; }
    }

    /// <summary>
    /// 查询条件
    /// </summary>
    public class CapitalRepairReportConditionModel 
    {
        public string? ApplicationNumber { get; set; }
        public string? CreatedDate { get; set; }
        public string? SongCarRenName { get; set; }
        public string? MaintenanceEngineerName { get; set; }
        public string? AssetNo { get; set; }
        public string? CurrentStatus { get; set; }
        public string? ApplicantName { get; set; }
        public string? CompanySegment { get; set; }
        public string? CurrentUser { get; set; }
        public string? ReceivedInKindTime { get; set; }
        public string? MaintenanceStartTime { get; set; }
        public string? OutsourcingDeliveryDate { get; set; }
        public string? SubcontractingCompletionDate { get; set; }
        public int pageIndex { get; set; }
        public int pageSize { get; set; }

    }

    /// <summary>
    /// 邮件发送实体
    /// </summary>
    public class MailSendModel
    {
        public int mailID{ get; set; }
        public string? mailFrom { get; set; }
        public string? mailTo { get; set; }
        public string? mailCC { get; set; }
        public string? mailBcc { get; set; }
        public string? mailSubject { get; set; }
        public string? mailBody { get; set; }
        public int isHtml { get; set; }
        public int mailStatus { get; set; }
        public DateTime? createdDate { get; set; }
    }
}
